package com.lichuang.fruitvarietysm.manage.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 商品表
 * </p>
 *
 * @author shuaihang
 * @since 2019-07-06
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "Goods对象", description = "商品表")
public class Goods implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "商品id")
    @TableId(value = "goods_id", type = IdType.AUTO)
    private Integer goodsId;

    @ApiModelProperty(value = "类别id")
    private Integer categoryId;

    @ApiModelProperty(value = "商品名称")
    private String goodsName;

    @ApiModelProperty(value = "商品副标题")
    private String goodsSubtitle;

    @ApiModelProperty(value = "商品主图，url地址")
    private String mainImage;

    @ApiModelProperty(value = "图片地址，json格式，扩展用")
    private String subImage;

    @ApiModelProperty(value = "商品详情")
    private String goodsDetail;

    @ApiModelProperty(value = "价格，单位-元保留两位小数")
    private BigDecimal goodsPrice;

    @ApiModelProperty(value = "库存数量")
    private Integer goodsStock;

    @ApiModelProperty(value = "商品状态，1=在售，2=下架，3=删除")
    private Integer goodsStatus;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新时间")
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "商品总销量")
    private Integer goodsTotalSales;

    @ApiModelProperty(value = "商品周销量")
    @TableField("goods_Weekly_sales")
    private Integer goodsWeeklySales;

    @ApiModelProperty(value = "限时低价,1=是限时低价商品“2=不是限时低价商品")
    private Integer miaosha;

    @ApiModelProperty(value = "商品父类id,代表哪个一级下的东西")
    private Integer pid;

    @ApiModelProperty(value = "商品积分")
    private Integer integral;

    @ApiModelProperty(value = "商品重量")
    private Double weight;

    @ApiModelProperty(value = "是否为sku的商品。1为是，2为不是")
    @TableField("isSku")
    private Integer isSku;
}
